package pl.com.margielewski.sttdatabase;

import pl.com.margielewski.sttdatabase.sqltables.SQLActualState;
import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
import android.util.Log;

public class DatabaseManager extends SQLiteOpenHelper {

	public DatabaseManager(Context context) {
		super(context, DBConfiguration.DBName, null,
				DBConfiguration.DBVersion + 1);
	}

	@Override
	public void onCreate(SQLiteDatabase db) {
		db.execSQL(SQLActualState.z_createTable);

		Log.d("DEBUG", "Database creating...");
		Log.d("DEBUG", "Table " + SQLActualState.tableName + " ver."
				+ DBConfiguration.DBVersion + " created");
	}

	@Override
	public void onUpgrade(SQLiteDatabase arg0, int arg1, int arg2) {
		Log.d("DEBUG", "This is it");
	}
}
